package com.xneure.enging.widget.grid;

import java.util.ArrayList;
import java.util.List;

import com.xneure.enging.ui.element.grid.UiGrid;
import com.xneure.enging.widget.Control;
import com.xneure.enging.widget.Widget;

public class Grid extends Widget<UiGrid> {
	Title title;

	public Grid(Control parent) {
		super(parent);
	}

	public List<Row> getRows() {
		List<Control> elems = getElems();
		List<Row> list = new ArrayList<Row>(elems.size());
		for (Control ctl : elems) {
			list.add((Row) ctl);
		}
		return list;
	}

	public void addRows(Row row) {
		addElement(row);
	}

	public void setTitle(Title title) {
		this.title = title;
	}
}
